from django.db import models
from ckeditor_uploader.fields import RichTextUploadingField


# Create your models here.
class Notice(models.Model):
    title = models.CharField(max_length=100, verbose_name='标题')
    abstract = models.TextField(max_length=200, verbose_name='摘要')
    content = RichTextUploadingField(config_name='my_config', verbose_name='内容')
    create_time = models.DateTimeField(auto_now_add=True ,verbose_name='发布日期')
    update_time = models.DateTimeField(auto_now=True, verbose_name='修改日期')

    def __str__(self):
        return self.title

    class Meta:
        verbose_name = '通知'
        verbose_name_plural = '通知'